/**
 * Created by scriptchao on 2017/11/17.
 */

const mongoose =  require('mongoose') 

const chatSchema = new mongoose.Schema({
    from: {type: String, required: true}, // 发送用户的id
    to: {type: String, required: true}, // 接收用户的id
    chat_id: {type: String, required: true}, // from和to组成的字符串
    content: {type: String, required: true}, // 内容
    read: {type:Boolean, default: false}, // 标识是否已读
    create_time: {type: Number} // 创建时间        
});

module.exports =  chatSchema